﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;

namespace Stu_sys.Entity
{
    
    public class User
    {
        public int UserId { get; set; }

        public string? UserName { get; set; }

        public string? Password { get; set; }

        public int RoleId { get; set; }
        public Role? Role { get; set; }

        public string? RealName { get; set; }

        public string? Phone { get; set; }

        public string? QQ { get; set; }

        public int SubjectId { get; set; }
        public Subject? Subject { get; set; }

        public int DepartmentId { get; set; }
        public Department? Department { get; set; }
        public int OfficeRoomId { get; set; }
        public OfficeRoom? OfficeRoom { get; set; }

        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public DateTime CreateTime { get; set; }

        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public DateTime UpdateTime { get; set; }
    }
}
